import request from '@/utils/request'

// 查询【测点与规则】列表
export function listDeviceRuleRef(query) {
  return request({
    url: '/device/pointRuleRef/list',
    method: 'get',
    params: query
  })
}

// 查询【测点与规则】详细
export function getDeviceRuleRef(id) {
  return request({
    url: '/device/pointRuleRef/' + id,
    method: 'get'
  })
}

// 新增【测点与规则】
export function addDeviceRuleRef(data) {
  return request({
    url: '/device/pointRuleRef',
    method: 'post',
    data: data
  })
}

// 修改【测点与规则】
export function updateDeviceRuleRef(data) {
  return request({
    url: '/device/pointRuleRef',
    method: 'put',
    data: data
  })
}

// 删除【测点与规则】
export function delDeviceRuleRef(id) {
  return request({
    url: '/device/pointRuleRef/' + id,
    method: 'delete'
  })
}

// 查询测点列表
export function getPoints() {
  return request({
    url: '/device/point/optionselect',
    method: 'get'
  })
}

// 查询解析列表
export function getRules() {
    return request({
      url: '/device/rule/optionselect',
      method: 'get'
    })
  }
  
// 查询【设备】详细
export function getDevice(id) {
    return request({
      url: '/device/device/' + id,
      method: 'get'
    })
  }